<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body>div {
            width: 200px;
            border: 1px solid red;
            overflow: hidden; /*解决所有子元素都浮动时导致高度为0的异常情况*/
        }
        #d1 {
            width: 50px;
            height: 50px;
            background-color: red;
            float: left;
        }
        #d2 {
            width: 50px;
            height: 50px;
            background-color: green;
            float: left;
        }
        #d3 {
            width: 50px;
            height: 50px;
            background-color: blue;
            float: left;
        }
        ul {
            list-style-type: none; /*去点*/
            overflow: hidden; /*解决高度为0时的显示异常*/
        }
        li {
            float: left;
            margin-right: 20px;
        }
    </style>
</head>
<body>
<ul>
    <li><a href="">夏侯惇/石头人</a></li>
    <li><a href="">赵云/挖掘机</a></li>
    <li><a href="">诸葛亮/发条</a></li>
    <li><a href="">孙尚香/金克斯</a></li>
    <li><a href="">刘禅/锤石</a></li>
</ul>
    <div>
        <div id="d1"></div>
        <div id="d2"></div>
        <div id="d3"></div>
    </div>
    <div id="d4">abcd</div>

</body>
</html>